package com.signway.module_signway_adapter_common_3;

import android.content.Context;
import android.util.Log;

import com.signway.open.api.IOpenControllerApi;

/*
 * -----------------------------------------------------------------
 * Copyright (C) 2011-2019, by your Signway, All rights reserved.
 * -----------------------------------------------------------------
 *
 * ProjectName: droid5119
 *
 * Author: Administrator
 *
 * Email: pf.wang@Signway.cn
 *
 * Description:
 *
 * -----------------------------------------------------------------
 * 2019-5-29 : Create SignwayCloudApi.java
 * -----------------------------------------------------------------
 */
public class SignwayControllerApi implements IOpenControllerApi {
    private static final String TAG = "SignwayCloudApi";
    private static SignwayControllerApi mSignwayControllerApi;
    private static Context mContext;

    public static synchronized SignwayControllerApi getInstance(Context context) {
        mContext = context;
        if (mSignwayControllerApi == null) {
            mSignwayControllerApi = new SignwayControllerApi(context);
        }
        return mSignwayControllerApi;
    }

    public SignwayControllerApi(Context context) {
        this.mContext = context;
    }

    @Override
    public void openUart() {
        Log.i(TAG, "openUart: ");
    }

    @Override
    public boolean gpioPinOutput(int gpioGroup, int gpioNum, int value) {
        return false;
    }

    @Override
    public int getGpioInput(int gpioGroup, int gpioNum) {
        return 0;
    }
}
